import java.util.Scanner;

/*
用链表来储存接受进来的数字
*/
class Link {
    public long number;
    public Link next;
    public Link(long number) {
        this.number = number;
    }
}

public class GetNumber_Two {
    //用于储存输入的数字
    long number;
    //设定链表表头
    Link head = new Link(0);

    /*
    分割数字
     */
    public void dellDigit (long number) {
        while (number != 0) {
            add(number % 10);
            number = number / 10;
        }
    }

    /*
    用头插法把数字插入链表
     */
    public void add(long n) {
        Link link = new Link(n);
        Link ptr;
        if (head.next == null) head.next = link;
        else {
            ptr = head.next;
            head.next = link;
            link.next = ptr;
        }

    }

    /*
    输出链表内容
     */
    public void printDigit(Link head) {
        Link p = head.next;

        System.out.println("n:" + number);
        System.out.printf("The digits of n are ");
        while (p != null) {
            if (p.next != null)
                System.out.print(p.number + ",");
            else
                System.out.print(p.number);
            p = p.next;
        }
    }

    /*
    主函数
     */
    public static void main(String[] args) {

        GetNumber_Two getNumberTwo = new GetNumber_Two();
        Scanner scanner = new Scanner(System.in);

        //输入任意位数的数字
        getNumberTwo.number = scanner.nextLong();
        //将数字分割 并且插入链表
        getNumberTwo.dellDigit(getNumberTwo.number);
        //输出结果
        getNumberTwo.printDigit(getNumberTwo.head);

    }

}

